package com.Drools.CIPS.sercice.impl;

import com.Drools.CIPS.bean.Rulers;
import com.Drools.CIPS.mapper.DroolsMapper;
import com.Drools.CIPS.sercice.DroolsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
@Slf4j
public class DroolsServiceImpl implements DroolsService {

    @Resource
    DroolsMapper droolsMapper;

    @Override
    public void addDrools(Rulers rulers) {
        droolsMapper.addDrools(rulers);
    }

    @Override
    public List<Rulers> getAll() {
        return droolsMapper.getAll();
    }

    @Override
    public List<Rulers> getGood() {
        return droolsMapper.getGood();
    }

    @Override
    public int update(String fileName) {
        return droolsMapper.update(fileName);
    }
    @Override
    public int update2(String packageName,String ruleName) {
        return droolsMapper.update2(packageName,ruleName);
    }
}
